#include "widget.h"
#include "ui_widget.h"
#include <QMovie>
#include<qrect.h>
#include<qtimer.h>
#include<QKeyEvent>
#include<QDebug>
#include<QFont>
#include<QPixmap>
#include<QMovie>
#include<qpainter.h>
#include<car.h>
#include<widget2.h>
#include "form.h"
#include "ui_form.h"
#include<qrect.h>
#include<qtimer.h>
#include<QKeyEvent>
#include<QDebug>
#include<QFont>
#include<QPixmap>
#include<QMovie>
#include<widget.h>
#include<QBitmap>
int mysw;
widget::widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::widget)
{
    ui->setupUi(this);
    this->setGeometry(QRect(200,200,800,310));
    this->resize( QSize( 670, 350));

    QMovie *movie = new QMovie(":/myimg/picture/741.gif");
    ui->label->setScaledContents(true);
    ui->label->setMovie(movie);
    movie->start();
}
void widget::paintEvent(QPaintEvent *event){
    QPainter painter(this);

    ui->pushButton_4->setStyleSheet(tr("background-image: url(:/myimg/picture/666.png);"));
    ui->pushButton_4->setFixedSize(QPixmap(":/myimg/picture/666.png").size());
    ui->pushButton_4->setMask(QPixmap(":/myimg/picture/666.png").mask());
}
widget::~widget()
{
    delete ui;
}



void widget::on_pushButton_clicked()
{

    widget2 *f=new widget2;
    f->show();
 mysw=1;
}


void widget::on_pushButton_2_clicked()
{
    widget2 *f=new  widget2;
    f->show();
     mysw=2;

}

void widget::on_pushButton_3_clicked()
{
     widget2 *f=new  widget2;
    f->show();
   mysw=3;
  }


void widget::on_pushButton_4_clicked()
{
    Form*k=new Form;
    k->show();
}

